<script type="text/javascript">
	$(function() {				    				    
		var editor = CKEDITOR.replace('admin_noidung_tao_tttbmoi',
			{
				filebrowserBrowseUrl : '<?php echo base_url()."ckeditor/ckfinder/ckfinder.html"; ?>',
			    filebrowserImageBrowseUrl : '<?php echo base_url()."ckeditor/ckfinder/ckfinder.html?Type=Images";?>',
			    filebrowserFlashBrowseUrl : '<?php echo base_url()."ckeditor/ckfinder/ckfinder.html?Type=Flash" ?>',
			    filebrowserUploadUrl : '<?php echo base_url()."ckeditor/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files"?>',
			    filebrowserImageUploadUrl : '<?php echo base_url()."ckeditor/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images";?>',
			    filebrowserFlashUploadUrl : '<?php echo base_url()."ckeditor/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash";?>',
			    filebrowserWindowWidth : '1200px',
			    filebrowserWindowHeight : '980px'
				

			});
		config.resize_minWidth = 300;
		config.resize_minHeight = 300;
		CKFinder.setupCKEditor( editor, "<?php echo base_url().'ckeditor/ckfinder/'?>" );
	});
	
</script>
<div id="sua_khachsan">
	<div id="tieude_sua_khachsan">
    	<img src="<?php echo base_url();?>image/admin/menu.png" width="35px" height="35px"><label>TẠO KHÁCH SẠN MỚI</label>
    </div>
    <div id="noidung_sua_khachsan">
        <div id="control_noidung_sua_khachsan">
            <div id="control_noidung_sua_khachsan_quayve"><label><a href="<?php echo base_url();?>index.php/admin/admin/qlkhachsan">Quay về</a></label></div>
            <div id="control_noidung_sua_khachsan_luu"><label><a href="#" onclick="document.forms['sua_khachsan_form_frm'].submit(); return false;">Đồng ý</a></label></div>
        </div>
        <div id="sua_khachsan_form">
					<?php
                        $attributes = array('id'=>'sua_khachsan_form_frm', 'name'=>'sua_khachsan_form_frm');			
                        echo form_open_multipart(base_url().'index.php/admin/admin/update_khachsan/'.$item2->id_khachsan,$attributes);
                    ?>                               	
                    	<div class="block_sua_khachsan">
                    		<label>Tên khách sạn</label>
                        	<input class="input_sua_khachsan" type="text" id="admin_tenkhachsan_sua_khachsan" name="admin_tenkhachsan_sua_khachsan" value="<?php echo set_value('admin_tenkhachsan_sua_khachsan',$item2->ten_khachsan) ?>"/>                                                      
                        </div>
                        <?php echo form_error('admin_tenkhachsan_sua_khachsan', '<div class="error_validate_sua_khachsan">', '</div>'); ?>
                        <div class="block_sua_khachsan">
                    		<label>Địa chỉ</label>
                        	<input class="input_sua_khachsan" type="text" id="admin_diachi_sua_khachsan" name="admin_diachi_sua_khachsan" value="<?php echo set_value('admin_diachi_sua_khachsan',$item2->dia_chi) ?>"/>                                                      
                        </div>
                        <?php echo form_error('admin_diachi_sua_khachsan', '<div class="error_validate_sua_khachsan">', '</div>'); ?>

                        <div class="block_sua_khachsan">
                    		<label>Tỉnh</label>
                            <?php 
							$mang=array("xin chào","các bạn đến với","phpbasic.com");
							$tinharr =array
							( "Cần Thơ","Đà Nẵng",'Hải Phòng','Hà Nội','Thành phố Hồ Chí Minh','An Giang','Bà Rịa',
							 'Vũng Tàu','Bạc Liêu','Bắc Giang','Bắc Kạn', 'Bắc Ninh','Bến Tre','Bình Dương',
							 'Bình Định','Bình Phước','Bình Thuận','Cà Mau','Cao Bằng','Đắk Lắk',
							 'Đắk Nông','Điện Biên','Đồng Nai' ,'Đồng Tháp','Gia Lai','Hà Giang','Hà Nam',
							 'Hà Tĩnh' ,'Hải Dương' ,'Hậu Giang', 'Hòa Bình' ,'Hưng Yên' ,'Khánh Hòa' , 'Kiên Giang',
							 'Kon Tum','Lai Châu', 'Lạng Sơn' , 'Lào Cai' , 'Lâm Đồng' ,'Long An' , 'Nam Định',
							'Nghệ An' ,'Ninh Bình','Ninh Thuận' , 'Phú Thọ', 'Phú Yên' , 'Quảng Bình' ,'Quảng Nam',
							'Quảng Ngãi' ,'Quảng Ninh','Quảng Trị','Sóc Trăng' , 'Sơn La' , 'Tây Ninh' , 'Thái Bình',
							'Thái Nguyên','Thanh Hóa', 'Thừa Thiên - Huế' , 'Tiền Giang','Trà Vinh' , 'Tuyên Quang',
							'Vĩnh Long','Vĩnh Phúc','Yên Bái',
							
							);?>
                            <select class="input_sua_khachsan" name="admin_tinh_sua_khachsan" id="admin_tinh_sua_khachsan">
                             <?php
								  for($i=0;$i<count($tinharr);$i++)
								{
									$str = $tinharr[$i];?>
                                <option value = "<?php echo $str;?>" <?php if($str ==$item2->tinh) echo "selected"?>><?php echo $str ?></option>;
                                <?php }
                                ?>
                            </select>
                       </div>
					<div class="block_sua_khachsan">
                    		<label>Xếp hạng</label>
                        	<input class="input_sua_khachsan" type="text" id="admin_xephang_sua_khachsan" name="admin_xephang_sua_khachsan" value="<?php echo set_value('admin_xephang_sua_khachsan',$item2->xep_hang) ?>"/>                                                      
                        </div>
                        <?php echo form_error('admin_xephang_sua_khachsan', '<div class="error_validate_sua_khachsan">', '</div>'); ?>
                        <div class="block_sua_khachsan">
                    		<label>Số điện thoại</label>
                        	<input class="input_sua_khachsan" type="text" id="admin_sdt_sua_khachsan" name="admin_sdt_sua_khachsan" value="<?php echo set_value('admin_sdt_sua_khachsan',$item2->sdt) ?>"/>                                                      
                        </div>
                        <?php echo form_error('admin_sdt_sua_khachsan', '<div class="error_validate_sua_khachsan">', '</div>'); ?>

                        <div class="block_sua_khachsan">
                    		<label>Email</label>
                        	<input class="input_sua_khachsan" type="text" id="admin_email_sua_khachsan" name="admin_email_sua_khachsan" value="<?php echo set_value('admin_email_sua_khachsan',$item2->email) ?>"/>                                                      
                        </div>
                        <?php echo form_error('admin_email_sua_khachsan', '<div class="error_validate_sua_khachsan">', '</div>'); ?>
                        <div class="block_sua_khachsan">
                    		<label>Website</label>
                        	<input class="input_sua_khachsan" type="text" id="admin_website_sua_khachsan" name="admin_website_sua_khachsan" value="<?php echo set_value('admin_website_sua_khachsan',$item2->website) ?>"/>                                                      
                        </div>
                        <?php echo form_error('admin_website_sua_khachsan', '<div class="error_validate_sua_khachsan">', '</div>'); ?>
                        
                        <div class="block_sua_khachsan">
                        	<label>Hình ảnh</label>	
    						<input class="input_sua_khachsan" type="file" name="admin_khachsan_fileHinhAnh_sua" id="admin_khachsan_fileHinhAnh_sua" />                         
                         </div>
                         <?php echo form_error('admin_khachsan_fileHinhAnh', '<div class="error_validate_sua_khachsan">', '</div>'); ?> 
 						<div class="block_sua_khachsan">
                    		<label>Trạng thái</label>
                            <select class="input_sua_khachsan" name="admin_trangthai_sua_khachsan" id="admin_trangthai_sua_khachsan">
                            	<option value"<?php echo $item2->trang_thai;?>" <?php if($item2->trang_thai==1) echo "selected" ?>>Hiển thị</option>
                                <option value"<?php echo $item2->trang_thai;?>" <?php if($item2->trang_thai==0) echo "selected" ?>>Không hiển thị</option>
                            </select>
                       </div>
                         <div class="block_sua_khachsan_mota">
                        	<label>Mô tả</label>
                            <textarea class="input_sua_khachsan_mota" id="admin_noidung_tao_tttbmoi" name="admin_noidung_tao_tttbmoi" value="<?php echo set_value('admin_noidung_tao_tttbmoi',$item2->mo_ta)?>"></textarea>
                          </div>
                         <?php echo form_error('admin_noidung_tao_tttbmoi', '<div class="error_validate_sua_khachsan">', '</div>'); ?> 

                    </form>
                </div> 	
    </div>
</div>